import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'
import 'ant-design-vue/dist/antd.css'
import Antd from 'ant-design-vue'
import PluginState from 'pinia-plugin-persistedstate'
import './permission.js'

const app = createApp(App)

// const piniaApp = createPinia()
// piniaApp.use(PluginState) //注册持久化插件
// createPinia().use(PluginState) //注册持久化插件
// app.use(createPinia())
const piniaApp = createPinia()
piniaApp.use(PluginState) //注册持久化插件
app.use(piniaApp)
app.use(router)
app.use(Antd)

app.mount('#app')
